package student.aistar.day12.exception;

public class AccountBiz {
    public static void main(String[] args){
        try {
            widDraw(-20);
        } catch (BalanceLtZeroException e) {
            e.printStackTrace();
        }
    }

    private static void widDraw(int i) throws BalanceLtZeroException {
        if(i <= 0){
           // System.out.println("余额小于0");
            throw new BalanceLtZeroException("余额小于0");
            //下方的代码是不会执行的...
            //return;
        }
        System.out.println("正常取钱");
    }
}
